Skip to content

Conversation

sameshai
Copy link
Member

No description provided.

Signed-off-by: Sameer Shaikh <[email protected]>
* Suppport for featureflag via GetProfile

Signed-off-by: Sameer Shaikh <[email protected]>

* Suppport for featureflag via GetProfile

Signed-off-by: Sameer Shaikh <[email protected]>

* Suppport for featureflag via GetProfile

Signed-off-by: Sameer Shaikh <[email protected]>

* Suppport for featureflag via GetProfile

Signed-off-by: Sameer Shaikh <[email protected]>

---------

Signed-off-by: Sameer Shaikh <[email protected]>
@sameshai
Copy link
Member Author

🔴 Coverage decreased from [84.7111%] to [84.1889%]

2 similar comments
@sameshai
Copy link
Member Author

🔴 Coverage decreased from [84.7111%] to [84.1889%]

@sameshai
Copy link
Member Author

🔴 Coverage decreased from [84.7111%] to [84.1889%]

Copy link
Collaborator

@arahamad arahamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments and do the changes accordingly

@@ -110,6 +111,11 @@ func (csiCS *CSIControllerServer) CreateVolume(ctx context.Context, req *csi.Cre
return nil, commonError.GetCSIError(ctxLogger, commonError.InvalidParameters, requestID, err)
}

if requestedVolume.Profile != nil && requestedVolume.Profile.Name == RFSProfile && !csiCS.Driver.rfsEnabled {
err = fmt.Errorf("RFS Profile is not accessible, please allowlist it from VPC team and restart the VPC FILE CSI Driver")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This we need to enhance so that user will have proper action

}

// validation zone and iops for 'rfs' profile
if volume.VPCVolume.Profile != nil && volume.VPCVolume.Profile.Name == RFSProfile {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these code block can be optimised, we are checking Profile != nil again and again

iops, err = strconv.Atoi(value)
if err != nil {
err = fmt.Errorf("%v:<%v> invalid value", key, value)
if len(value) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure this code should be released only for 2.0 driver

iopsStr := value
volume.Iops = &iopsStr
}
case Throughput:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughput is only supported for rfs profile, looks code is not uniform somewhere we are checking profile and taking action and somewhere its not


err = session.GetVolumeProfileByName(RFSProfile)
if err != nil {
icDriver.rfsEnabled = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not required to set false again
also warning msg need to improve like user don't have access to RFS profile so RFS share creation will not work, user need to be allowed for RFS profile from VPC IaaS team etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants